﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LPrisaMVC.Entities;
using LPrisaMVC.DAO;
using Microsoft.Practices.Unity;

namespace LPrisaMVC.BusinessLogic
{
    public class DetalleCreditoBL:IDetalleCreditoBL
    {
        [Dependency]
        public IDetalleCreditoDAO detCreditoDAO { get; set; }


        public DETALLE_CREDITO GetDetalleCreditoByCreditoIdAndProductoId(int idCredito, int idProd)
        {
            return detCreditoDAO.GetDetalleCreditoByCreditoIdAndProductoId(idCredito, idProd);
        }

        public List<DETALLE_CREDITO> GetFromDetalleCreditoByProductoDescAndCreditoId(string descripcion, int idCredito)
        {
            return detCreditoDAO.GetFromDetalleCreditoByProductoDescAndCreditoId(descripcion, idCredito);
        }

        public void RemoveDetalleCreditoByCreditoIdAndProductoId(int idCredito, int idProd)
        {
            detCreditoDAO.RemoveDetalleCreditoByCreditoIdAndProductoId(idCredito, idProd);
        }

        public void UpdateDetalleCreditoByCreditoIdAndProductoId(int idCredito, int idProd)
        {
            detCreditoDAO.UpdateDetalleCreditoByCreditoIdAndProductoId(idCredito, idProd);
        }
    }
}
